home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / Dylan Related / Mindy / Mindy 1.2 - portable sources / interp / instance.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-15  |  2.3 KB  |  77 lines  |  [TEXT/ttxt]

  1. /**********************************************************************\
  2. *
  3. *  Copyright (c) 1994  Carnegie Mellon University
  4. *  All rights reserved.
  5. *  
  6. *  Use and copying of this software and preparation of derivative
  7. *  works based on this software are permitted, including commercial
  8. *  use, provided that the following conditions are observed:
  9. *  
  10. *  1. This copyright notice must be retained in full on any copies
  11. *     and on appropriate parts of any derivative works.
  12. *  2. Documentation (paper or online) accompanying any system that
  13. *     incorporates this software, or any part of it, must acknowledge
  14. *     the contribution of the Gwydion Project at Carnegie Mellon
  15. *     University.
  16. *  
  17. *  This software is made available "as is".  Neither the authors nor
  18. *  Carnegie Mellon University make any warranty about the software,
  19. *  its performance, or its conformity to any specification.
  20. *  
  21. *  Bug reports, questions, comments, and suggestions should be sent by
  22. *  E-mail to the Internet address "gwydion-bugs@cs.cmu.edu".
  23. *
  24. ***********************************************************************
  25. *
  26. * $Header: instance.h,v 1.8 94/11/30 16:18:51 rgs Exp $
  27. *
  28. \**********************************************************************/
  29.  
  30.  
  31. enum slot_allocation {
  32.     alloc_INSTANCE, alloc_CLASS, alloc_SUBCLASS, alloc_CONSTANT, alloc_VIRTUAL,
  33.     alloc_Kinds
  34. };
  35.  
  36. struct library;
  37.  
  38. struct defined_class {
  39.     obj_t class;
  40.     enum type_Id type_id;
  41.     boolean abstract_p;
  42.     boolean sealed_p;
  43.     struct library *library;
  44.     int (*scavenge)(struct object *ptr);
  45.     obj_t (*transport)(obj_t object);
  46.     void (*print)(obj_t object);
  47.     obj_t debug_name;
  48.     obj_t superclasses;
  49.     obj_t cpl;
  50.     obj_t direct_subclasses;
  51.     obj_t all_subclasses;
  52.  
  53.     obj_t new_slots;
  54.     obj_t all_slots;
  55.     obj_t new_initargs;
  56.     obj_t all_initargs;
  57.     obj_t inheriteds;
  58.  
  59.     obj_t instance_positions;
  60.     int instance_length;
  61.     obj_t instance_layout;
  62.  
  63.     obj_t subclass_positions;
  64.     obj_t subclass_slots;
  65.     obj_t subclass_layout;
  66. };
  67.  
  68. #define DC(o) obj_ptr(struct defined_class *, o)
  69.  
  70. extern obj_t obj_DefinedClassClass;
  71.  
  72. extern void describe(obj_t thing);
  73.  
  74. extern obj_t make_defined_class(obj_t debug_name, struct library *library);
  75. extern void init_defined_class(obj_t class, obj_t slots,
  76.                    obj_t initargs, obj_t inheriteds);
  77.